<h1>Listing books</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Author</th>
    <th>Publisher</th>
    <th>Date in</th>
    <th>Can user</th>
    <th>Description</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @books.each do |book| %>
  <tr>
    <td><%= book.name %></td>
    <td><%= book.author %></td>
    <td><%= book.publisher %></td>
    <td><%= book.date_in %></td>
    <td><%= book.can_user %></td>
    <td><%= book.description %></td>
    <td><%= link_to 'Show', [:librarian,book] %></td>
    <td><%= link_to 'Edit', edit_librarian_book_path(book) %></td>
    <td><%= link_to 'Destroy', [:librarian,book], method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Book', new_librarian_book_path %>
